<?php

namespace App\Jobs;

use App\Common\Status;
use App\Http\Logic\Admin\JobLogic;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;

class SendEmail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    private $data;

    /**
     * Create a new job instance.
     * @param $data
     */
    public function __construct($data)
    {

        $this->data = $data;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
//        Log::channel('send_email')->info("邮件-简历相关参数 ：" . json_encode($this->data, JSON_UNESCAPED_UNICODE));
//        JobLogic::createPdfSendEmail(
//            $this->data["noteId"],
//            $this->data["source"],
//            $this->data["annex"],
//            $this->data["jid"]
//        );

        var_dump('===== ok =====');
        var_dump('===== ok =====');

    }


    /**
     * @param null $exception
     * 执行失败的任务
     */
    public function failed($exception = null)
    {

    }
}
